home *** CD-ROM | disk | FTP | other *** search
/ Floppyshop 2 / Floppyshop - 2.zip / Floppyshop - 2.iso / art&graf.ix / art-3617 / st_zip.2_2 / stzip.doc < prev    next >
Text File  |  1987-04-21  |  23KB  |  568 lines

  1.  
  2.  
  3.  
  4.   ____________________________
  5.                            _________  ***** ******    ******  *  *****
  6. __________________________           *        *         **   *  *    *
  7.                     _________________ **     *       ***    *  ******
  8.   ________________                     *   *      **      *  *
  9.                     _____________ *****   *      ******  *  *
  10.      ______________________
  11.  
  12.  
  13.  
  14.  
  15.                             STZip version 2.2
  16.                        (c) Vincent Pomey 1990-1993
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.         **************
  25.         * 0 - Prolog *
  26.         **************
  27.  
  28.     STZip is a program that allows you to compress and decompress
  29. files, i.e.  to reduce their lengths. You saves space on your disks and
  30. reduce the transmission time if you send the files by modem. It also
  31. allows you to group several files in one single file, whose extension
  32. in general is ZIP.
  33.  
  34.     STZip uses files that are compatible with PKZip 2.04 on the IBM PC,
  35. and the Unix Info-Zip programs Zip 1.9/Unzip 5.0.
  36.  
  37.     You can and are encouraged to copy, distribute and put this program
  38. for download on bulletin boards. Commercial use is not authorized
  39. without agreement. Use this program at your own risk, I do not provide
  40. any warranty about it.
  41. Please avoid to "repackage" STZip, I prefer than the users gets all the
  42. files originally in the distribution.
  43.  
  44. This is postcardware, if you use it, please send a nice postcard to
  45.  
  46. Vincent Pomey
  47. 2 allée Valéry Larbaud
  48. 92260 Fontenay aux roses - France
  49.  
  50. I inform registered users of new versions if they supply an E-mail address.
  51. Thanks to all users who were kind enough to register !
  52.  
  53. The program is written in Modula-2 and assembler. For information on
  54. the file-format, see APPNOTE.TXT distributed with PKZip.
  55.  
  56. I can be contacted via electronic mail :
  57. Fido  : Vincent Pomey (2:320/100.2)
  58. Email : vincent@stell.fr.mugnet.org or vincent@stell.gna.org (unreliable)
  59.  
  60.     As you will probably see if you read this doc, I'm not a good
  61. technical writer... Sorry for that !
  62.  
  63.  
  64.                               ----oooOooo---
  65.  
  66.  
  67. There are several ways to use STZip:
  68.  
  69.         - double-clicking STZIP.PRG, using the GEM-interface
  70.  
  71.         - installing it as an application in the desktop: click once on
  72. STZIP.PRG, choose from the Desktop's menus the entry "Install 
  73. Application," type ZIP and confirm. After this, you may save the
  74. desktop.  Now, to use ZIP you only have to double-click a file with the
  75. extension  .ZIP and you will find yourself in STZip, with GEM interface
  76. for using that file.
  77.  
  78.         - renaming STZIP.PRG to STZIP.TTP and using it (or ZIPJR.TTP)
  79. with a command  line.
  80.  
  81.         - from a command line interpreter or external program, also using 
  82. a command line.
  83.  
  84.         - with some desktops, it is possible to drag and drop a file to
  85. the STZip icon. If this is a zipfile, it will be opened. If not, a
  86. zipfile with a similar name (e.g. FLAP.ZIP if you dropped FLAP.PRG)
  87. will be opened.
  88.  
  89. The usage with the GEM interface is the easiest. Certain options are 
  90. available only in GEM (the comments for example), while others are only 
  91. present with command-line usage (e.g. excluding files from compression).
  92.  
  93. ZIPJR.TTP is a stripped down version of STZIP : it does not have code
  94. for the GEM interface, but features are exactly the same if you're
  95. using the command line interface. The only advantage is that it is
  96. smaller.
  97.  
  98.  
  99.         *********************************
  100.         * I - Usage with a command line *
  101.         *********************************
  102.  
  103. The usage of STZip with a command line is similar to that of ARC or LHArc 
  104. on the Atari, or PKZip on the PC.
  105.  
  106.  
  107.    1 -  A Table
  108.    ------------
  109.  
  110.  
  111.    +--------------------------------------------------------------------+
  112.    |       The syntax is of the form:                                   |
  113.    |                                                                    |
  114.    |    STZip command {options} [path] zipfile {file}                   |
  115.    |                                                                    |
  116.    |                                                                    |
  117.    |  There has to be one single command:                               |
  118.    |                                                                    |
  119.    |    -a      add files                                               |
  120.    |    -d      delete files                                            |
  121.    |    -f      freshen: update files in the zip-file                   |
  122.    |    -u      update: add new files and freshen the ones already      |
  123.    |            present in the zip-file                                 |
  124.    |    -x      extract files                                           |
  125.    |    -s      extract compressed files on the screen                  |
  126.    |    -c      check the zipfile                                       |
  127.    |    -v      list of the files with info                             |
  128.    |    -l      list of the files, just with their names                |
  129.    |    -?      a bit of help                                           |
  130.    |                                                                    |
  131.    |                                                                    |
  132.    |   You can also add a few options:                                  |
  133.    |                                                                    |
  134.    |    -o      overwrite a file without asking for confirmation        |
  135.    |            if the file already exists                              |
  136.    |    -r     `recursive compression: all the files in the             |
  137.    |            sub-directories you selected will also be compressed.   |
  138.    |           `recursive decompression: files compressed from sub-     |
  139.    |            directories will be decompressed in the corresponding   |
  140.    |            folders, which will be created if they don't exist.     |
  141.    |    -p      store pathname: the pathname of the file you have       |
  142.    |            specified in the command line is stored in the zip;     |
  143.    |            automatic with recursive compression                    |
  144.    |    -m      move file: files are deleted after compression          |
  145.    |    -t      the date of the .zip file will be that of the file      |
  146.    |            compressed with the most recent date.                   |
  147.    |    -z      modify the general comment for the zip file             |
  148.    |    -i dir  put the files to be compressed in the subdirectory      |
  149.    |            DIR in the zipfile                                      |
  150.    |    -g      extract the file FFF.ZIP in the directory FFF           |
  151.    |    -w pw   encrypt the files to be added using pw as password      |
  152.    |            or use pw to decrypt the files to be extracted          |
  153.    |    -nmmddyy add only the files newer than mm/dd/yy (US date format)|
  154.    |    -h      wait for keypress before terminating the program        |
  155.    |    -e      specifies the compression method:                       |
  156.    |             -es    store, no compression                           |
  157.    |             -eh    shrink, quick compression                       |
  158.    |             -ei    implode, default                                |
  159.    |             -ed    deflate, better compression                     |
  160.    |                                                                    |
  161.    +--------------------------------------------------------------------+
  162.  
  163. Note that you can use the -z option alone, without any command. STZip
  164. will only ask you for the new comment of the file.
  165.  
  166.    2 - The command line
  167.    --------------------
  168.  
  169.    You can specify the folder that is to be used as a default for all 
  170. operations after the commands and the options: for example d:\texts\.
  171. Note the \ at the end.
  172.  
  173.    Following that, the name of the zipfile, that will contain (or already 
  174. contains) compressed files, must be specified. The extension .ZIP is the
  175. default. You may use wildcards for the zipfile (but be sure that your
  176. shell doesn't expand them because it won't work) : all the matching
  177. zipfiles will be processed .
  178. e.g.  stzip -xg *.zip    this will extract all the zip files in their directory
  179.    or stzip -z *.zip <comment.txt  this will change the zip comments for all
  180.   the zipfiles. (note that -z may now be used alone, without any action
  181.   switch).
  182.  
  183.    After all this, you put the list of files to be processed (i.e.: to be
  184. deleted, compressed or decompressed). It may be a directory name (without
  185. trailing \), all files inside that directory will be processed.
  186.  
  187.  
  188.    You may use the wildcards ? and * in the names of files:
  189.                 ? represents any single character
  190.                 * represents a string of characters
  191.  
  192.    Not specifying any file names is the same as *.* (all files).
  193.  
  194.  
  195.    3 - External list
  196.    -----------------
  197.  
  198.    If a name begins with a @, it means that that file contains a list
  199. of files to be treated. If you have a file list.txt containing for
  200. example:
  201.  
  202.         *.mod
  203.         zip*.txt
  204.         file1.vdt
  205.  
  206.    then stzip -a burp @list.txt         is equivalent to
  207.         stzip -a burp *.mod zip*.txt file1.vdt
  208.  
  209.    stzip -a burp @   will read the names of the file from stdin
  210. (generally keyboard).
  211.  
  212.  
  213.    4 -  Excluding files
  214.    --------------------
  215.  
  216.    If a name begins with a ~, it means that it is NOT to be added. It is 
  217. solely of interest when one uses wildcards; for example, to compress 
  218. all files except .BAK, you have to use something like this: stzip -a burp 
  219. *.* ~*.bak
  220.  
  221.  
  222.    5 - Odds & Ends
  223.    ---------------
  224.  
  225.       An external list may contains another external list, but not ~
  226. file names. The ~ file names of the command line are valid for all
  227. files, including the ones read from external lists.
  228.  
  229.       Matching wildcards goes MS-DOS style, not the Unix way: *.* matches 
  230. all files, and not only those that have a . in their name. Paths using '..' 
  231. are not supported.
  232.  
  233.       The -p switch:
  234. if you run stzip -ap burp folder\alt.txt, the name of the file in the zip 
  235. will be folder\alt.txt, while without the -p switch, it would have been 
  236. alt.txt. The -p switch is automatically invoked during recursive 
  237. compression.
  238.  
  239.  
  240.     6 - Recursive compression
  241.     -------------------------
  242.  
  243.         If you have entered the -r option for compression, an important 
  244. thing will happen: the files you specify will also be searched for in all 
  245. sub-directories below you.
  246.  
  247.         The second attempt at explaining will be based on examples, the 
  248. first one being incomprehensible without several hours of meditation 
  249. topped off with a bunch of aspirins.
  250.  
  251.     An important thing to note is that if STZip doesn't do want
  252. you want, either compression or extraction, that's probably because
  253. you have forgotten to add the -r switch.
  254.  
  255. (In order to better understand the second attempt, remember that 
  256. folders do not actually exist within a zip-file. It's the path of the
  257. files (stored in the .zip) that contains the names of the folders)
  258.  
  259. fld is a folder.
  260. ...\ stands for any quantity of folders, or even none.
  261.  
  262. * stzip -ar burp
  263.         All the files in the current folder will be compressed, including 
  264. sub-directories.
  265.  
  266. * stzip -ar burp fld
  267.         The files fld\...\*.* will be compressed. The name fld\...\*.* is 
  268. stored in the zip file. To recap: all the files in fld are compressed, 
  269. including all the subdirectories found in fld.
  270.  
  271. * stzip -ar burp fld\*.txt
  272.         The files fld\...\*.txt will be compressed. The names 
  273. fld\...\*.txt are stored in the zip file. To recap: all the files with the 
  274. extension txt in fld are compressed, including all those found in the 
  275. subdirectories found in fld.
  276.  
  277. * stzip -ar burp fld\file.txt
  278.         The files fld\...\file.txt will be compressed. The names 
  279. fld\...\file.txt are stored in the zip file. To recap: all the files with 
  280. the name file.txt in fld are compressed, including all those found in the 
  281. subdirectories found in fld.
  282.  
  283. * stzip -ar burp c:\fld
  284.         The files c:\fld\...\*.* will be compressed. The names \...\*.* 
  285. are stored in the zip file. This means that c:\fld\ will NOT be stored as 
  286. part of the file names of the compressed files, because it is a COMPLETE 
  287. path, different from fld\.
  288.         Also, by using the changing of the working directory (of the kind 
  289. stzip -ar burp c:\fld1\ fld2\*.txt) it is possible to perform all sorts of 
  290. complex manipulations with the names of the files to be compressed. In the 
  291. above example, the files with the extension txt in c:\fld1\fld2 will be 
  292. compressed, but their names in the zip-file will be fld2\*.txt.
  293.  
  294.         No tests are performed EVER on the names of folders.
  295. stzip -ar burp *.txt will search in all directories, not only in those 
  296. with the extension txt!
  297.  
  298.         Some Unix-style shells perform themselves the substitutions of the 
  299. wildcards. STZip does not respond similarly to 
  300. 'stzip -ar burp fld\a.txt fld\b.txt' and
  301. 'stzip -ar burp fld\*.txt' even though for the shell this may be the same. 
  302. In this case, it is therefore necessary to add quotation marks to 
  303. fld\*.txt so that the shell will not substitute the wildcards. Likewise, 
  304. the ~ character may pose problems.
  305.  
  306.  
  307.    7 - Recursive decompression
  308.    ---------------------------
  309.  
  310.         If a zip file contains folders, there are two possibilities:
  311.  - ignore them and decompress to the current working directory (which is 
  312.    the default). This allows for the quick decompression of a specific 
  313.    file without creating lots of folders.
  314.  - or decompress the files to these folders and create the folders when 
  315.    necessary. For this, use option -r.
  316.  
  317. You can always add paths and use wildcards in the filenames. If you 
  318. specify in the parameters a name with a path, for example infra\*.msg, 
  319. then all *.msg files in infra AND in its subdirectories will be extracted.
  320.  
  321.  
  322.     8 - Comments
  323.     ------------
  324.  
  325.         The global comment for the entire zip file (changed with the -z 
  326. switch) is displayed every time the zipfile is accessed. In Gem, it is
  327. also possible to have a comment for each files in the zipfile, it is
  328. displayed when the file is extracted.
  329.  
  330.  
  331.  
  332.       ********************************
  333.       * II - Using the GEM interface *
  334.       ********************************
  335.  
  336.  
  337.    1 - General
  338.    -----------
  339.  
  340. The general algorithm is to select files on the disk selector and then
  341. click on the "Compress" button if you want to compress files, and select
  342. files on the zipfile selector and then click on the "Extract" button if
  343. you want to extract files.
  344. If you click on the "Compress" or "Extract" button without having
  345. selected any files, STZip will suggest you to process all the files.
  346.  
  347. You may unselect the files by clicking on the "Select: 000" button (it
  348. shows the number of selected files).
  349.  
  350. To change the zipfile, click on the close-box of the Zip file selector.
  351.  
  352. The "Recurse Subdirs" button:
  353.       during compression, if it is selected, then all subdirectories will 
  354. also be compressed.
  355.       during decompression, if it is selected, then all files will be 
  356. extracted to their original directory : DIR\FILE.TXT will be extracted
  357. in directory DIR (created if it doesn't exist). If not selected,
  358. DIR\FILE.TXT will be extracted as FILE.TXT, in the current directory.
  359.  
  360.  
  361.    2 - Informations/Comments/Display a file
  362.    ----------------------------------------
  363.  
  364. To get information about the entire zip file, you have to double-click
  365. on name of the zip file.
  366.  
  367. Similarly, you may get information about a specific file in the zip or
  368. on the disk by double-clicking on its name.
  369.  
  370. Information about the zipfile and the compression files contains some
  371. comments, and you may edit them. Zipfile comments are displayed
  372. whenever accessing the zipfile, while comments specific to a compressed
  373. file is displayed when extracting this file. The comments are saved on
  374. disk when you change the zipfile or when you quit STZip. This results in
  375. some disk access.
  376.  
  377. While looking the information of a disk file, you may rename it.
  378.  
  379. While looking the information of a file (compressed or on disk), you
  380. will be able to Display it (by clicking on the Trash button, uhh no,
  381. the Display button). Then, a few keys are available :
  382.  
  383.     arrow keys : Move the text
  384.     Clr-Home :     Goto beginning of the file
  385.     Shift-Clr-Home : Goto end of the file
  386.     Ctrl-V :     Copy the file on the clipboard
  387.     Ctrl-S :     Save the file (will ask for filename)
  388.     Ctrl-C :     Change the font or the font-size used
  389.     Ctrl-F :     Search a string
  390.     Ctrl-N :     Search same string
  391.     Ctrl-P :     Print file
  392.     Ctrl-Q :     Print block
  393.     Ctrl-B :     Save block (will ask for filename)
  394.     Ctrl-W :     Copy the block on the clipboard
  395.     ESC :         Quit the display mode
  396.  
  397. It is also possible to get a menus with those options by pressing the
  398. HELP key or by double-clicking in the window.
  399.  
  400. The block is selected by using the mouse : the first button sets the
  401. beginning of the block, and the second button the end of the block.
  402. The block is displayed in bold fonts.
  403.  
  404.  
  405.    3 - Configuration
  406.    -----------------
  407.  
  408.     The Configuration dialog box lets you choose the compression
  409. method, the sort method for the Zip selector and the Disk selector,
  410.  
  411.     The configuration file contains all those choice, plus the
  412. current disk path and list field (the mask for the compressed files to
  413. be listed), as well as the Font ID, Font Size and Tab Size used while
  414. displaying files. It is saved in the home directory of STZip.
  415.  
  416.     On later call, STZip will go in the directory where you were
  417. when you saved the configuration. That way it will always start listing
  418. the files of the same directory. Since you may not like that, an option
  419. disable this and STZip stays in the current directory ("Go in current dir
  420. rather than saved dir").
  421.  
  422.  
  423.         *****************************
  424.         * III - Third part of the doc
  425.         *****************************
  426.  
  427.  
  428.    1 - Compression method
  429.    ----------------------
  430.  
  431.       The best compression method is _deflating_. It is quite
  432. recent, but is now available in PKZIP 2.04 and upper on PC, and in
  433. Zip 1.9/Unzip 5.0 on Unix (and Amigas etc).
  434.  
  435.       The deflating method has three variants : one that compress
  436. faster but not so good, one medium, and one which compress best but
  437. slowly. There are buttons to select the one you want in Gem (Config
  438. dialog box). Using a command line, -edf gives you the fast one, -edb
  439. the best one, and -ed the medium.
  440.  
  441.     The default compression method is the medium deflating.
  442.  
  443.     _Shrinking_ is an very fast compression method, but not as good
  444. as deflating or imploding. _Storing_ simply stores the files without
  445. compression. You may use that if the files are uncompressible (already
  446. compressed files or compressed pictures such as GIF or JPEG files).
  447.  
  448.     _Imploding_ is an old compression method, now considered as
  449. obsolete as deflating is better. You may still use it if you want that
  450. your files may be extracted using old versions of STZip.
  451.  
  452.     STZip checks if the file to be compressed has been already
  453. compressed using ARC, LHARC, ZIP, ZOO, freeze, compress, PfxPack, Ice
  454. or Atom. That way, you won't loose time or space by trying to compress
  455. files that would give bad or no compression at all (not speaking of
  456. growing in size, which is possible with the Implode method).
  457.  
  458.  
  459.    2 - Updating and freshening
  460.    ---------------------------
  461.  
  462.        These options allows to add a file you specified (in the command
  463. line) or selected (in Gem) only if it is needed :
  464.  
  465.  -Freshening : only specified files that are already in the zip and are
  466.         newer than those in the zip will be added.
  467.  -Updating : only specified files that are already in the zip and are
  468.          newer than those in the zip, _AND_ the specified files that are
  469.          not in the zipfile will be added.
  470.  
  471.  -Using a date line : only the files changed after the specified date will
  472.          be added.
  473.  
  474. To use those features in Gem, click on the 'Add Mode' box, and select what you
  475. want.
  476.  
  477. To use those features in a command line,
  478.    freshening is -f : stzip -f backup *.c
  479.    updating is -u   : stzip -u galery *.gif
  480.    date line is -t  : stzip -a -t011692 fip *.prg
  481.       Will add all *.prg files created or changed after Janury 16th 1992.
  482.       Note the US date format !
  483.  
  484.  
  485.    3 - Self extracting files
  486.    -------------------------
  487.  
  488.   You may use ZIP2TOS.PRG to convert a zip file to a .TOS program which
  489. will contains the compressed files and will extract them when launched.
  490.  
  491.   Without parameters, you will be prompted for the file to convert. You may
  492. also calls it with the zipfile names in parameters, from the desktop (drag
  493. a file) or a shell (zip2tos *.zip)
  494.  
  495.   A self extracting file should contains _only_ deflating or stored files. It
  496. will be unable to explode or unshrink files. This is _not_ checked when
  497. ZIP2TOS does the conversion.
  498.  
  499.   A self extracting file may be used as a normal zip file. Using STZip >1.3,
  500. you will be able to change the comments, list, extract, add or delete
  501. compressed files in the self extracting file.
  502.  
  503.  
  504.    4 - Encryption
  505.    --------------
  506.  
  507.   A compressed file inside a zip may be crypted. STZip use the same
  508. algorithm as PKZIP, and also support the slighly different method used
  509. in the Unix versions of Zip/Unzip.
  510.  
  511.   You may specify a password using the -w switch when using the command
  512. line interface, or by clicking in the "Crypt box" in the Gem interface.
  513. The files to be compressed will be encrypted using that password.
  514.  
  515.   That password will be also used when extracting files. If you forgot
  516. to specify it and STZip encounter a crypted file, it will prompt you.
  517. (i.e. : if you compress files using password BURP and extract them
  518. without leaving STZip, STZip won't prompt you for the password since it
  519. still has BURP in mind).
  520.  
  521.   STZip is also able to tell you if the password supplied for extracting a
  522. file is wrong. Note that the password is not stored in the file (would be
  523. stupid!), STZip uses some techniques to see if the beginning of the file
  524. extracts correctly with the supplied password.
  525.  
  526.  
  527.    5 - Return codes from command line mode
  528.    ---------------------------------------
  529.  
  530.   1 : not enough memory
  531.   2 : file not found
  532.   3 : illegal option
  533.   4 : two actions specified
  534.   5 : no zip file specified
  535.   6 : no command specified
  536.   7 : error reading
  537.   8 : this file is not a zip file
  538.   9 : error writing
  539.  11 : warning during extraction (read/write error, CRC error ...)
  540.  12 : warning during compression
  541.  
  542. 100 : Function not implemented
  543.  
  544.  
  545.     6 - Limitations
  546.     ---------------
  547.  
  548. The number of files in a zip is maximum 65536.
  549. Nevertheless, selection box in the GEM dialogs cannot display more than
  550. 200 files in a directory. A file with two directories of 200 files each
  551. will be displayed correctly in Gem. A file with 400 files in one
  552. directory will be processed correctly in Gem, but only the first 200
  553. files will be in the selection box.
  554.  
  555.  
  556.     7 - The End
  557.     -----------
  558.  
  559. Thanks to H. Okumura for his help with the 'sliding dictionary' 
  560. compression and to Philippe Regnauld for the STZIP logo in GEM.
  561.  
  562. Have fun using it !
  563.  
  564.  
  565.         Vincent Pomey, 28 April 1990, 13 April 1991.
  566.         Translation by Peter Kocourek, 25 July 1991.
  567.         Updated, 27 December 1992, 13 Febrary 1993
  568.